package com.demo.reduction;

import com.demo.common.Dish;
import com.demo.common.DishUtil;

import java.util.List;
import java.util.stream.Collectors;

public class TestCounting {
    public static void main(String[] args) {
        List<Dish> menu = DishUtil.getDishes();
        long howManyDishes = menu.stream().collect(Collectors.counting());
        System.out.println(howManyDishes);
    }
}
